package com.kma.summer2012.client.events;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

/**
 * Created with IntelliJ IDEA.
 * User: EUGENE
 * Date: 2/19/13
 * Time: 11:24 PM
 * To change this template use File | Settings | File Templates.
 */
public class UpdateCellTableEvent extends GwtEvent<UpdateCellTableEvent.UpdateCellTableEventHandler> {
    private static Type<UpdateCellTableEventHandler> TYPE = new Type<UpdateCellTableEventHandler>();
    public Integer tableID;

    public UpdateCellTableEvent(Integer tableId) {
        this.tableID = tableId;
    }

    @Override
    public Type<UpdateCellTableEventHandler> getAssociatedType() {
        return TYPE;
    }

    public static Type<UpdateCellTableEventHandler> getType() {
        return TYPE;
    }

    @Override
    protected void dispatch(UpdateCellTableEventHandler importRequestEventHandler) {
        importRequestEventHandler.onFillCellTable(this);
    }

    public interface UpdateCellTableEventHandler extends EventHandler {
        void onFillCellTable(UpdateCellTableEvent event);
    }
}
